// You have generated a new plugin project without
// specifying the `--platforms` flag. A plugin project supports no platforms is generated.
// To add platforms, run `flutter create -t plugin --platforms <platforms> .` under the same
// directory. You can also find a detailed instruction on how to add platforms in the `pubspec.yaml` at https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms.

import 'package:base_lib/index.dart';
import 'package:common_lib/common_compoent.dart';
import 'package:doctor_examine_lib/doctor_examine_componet.dart';
import 'package:doctor_login_lib/component.dart';
import 'package:flutter/material.dart';

class DoctorExamineLib {
  static void doInit() {
    App.initializer(
        [DoctorExamineComponent(), DoctorLoginComponent(), CommonComponent()],
        DoctorLoginComponent.loginPage,
        DoctorExamineComponent.offlineExaminePage);
  }

  static void initWithContext(BuildContext context) {
    ScreenAdapter.getInstance().init(context);
  }

  static void jump2Login(BuildContext context) {
    Routers.navigateTo(context, DoctorLoginComponent.loginPage);
  }

  static void jumpPatientManagement(BuildContext context) {
    Routers.navigateTo(context, CommonComponent.patientManagement,
        parameters: Parameters()..putString("title", "添加就诊人"));
  }
}

class TipWrap extends StatelessWidget {
  final Widget child;

  TipWrap(this.child);

  @override
  Widget build(BuildContext context) {
    return OverlaySupport(
      child: child,
    );
  }
}
